package com.adtec.base.cloud.server.gateway;

import com.adtec.base.cloud.server.gateway.filter.handler.MySentinelBlockHandler;
import com.alibaba.csp.sentinel.adapter.spring.webflux.callback.WebFluxCallbackManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.gateway.route.RouteLocator;
import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.http.HttpMethod;


@SpringBootApplication
@EnableDiscoveryClient
public class AdtecCloudServerGatewayApplication {

	public static void main(String[] args) {

		WebFluxCallbackManager.setBlockHandler(new MySentinelBlockHandler());

		SpringApplication.run(AdtecCloudServerGatewayApplication.class, args);
	}

}
